package com.bytedance.improvingroad.fragment

import com.bytedance.improvingroad.BaseFragment
import com.bytedance.improvingroad.adapter.CommonPageAdapter
import com.bytedance.improvingroad.databinding.FragmentModifyTraditionalNestedBinding
import com.bytedance.improvingroad.databinding.FragmentTraditionalNestedBinding
import com.google.android.material.tabs.TabLayout
import com.google.android.material.tabs.TabLayoutMediator

class ModifyTraditionalNestedFragment : BaseFragment<FragmentModifyTraditionalNestedBinding>() {

    override fun initData() {
        binding.viewPager.adapter = CommonPageAdapter(requireActivity(), 3)
        TabLayoutMediator(binding.tab, binding.viewPager) { tab : TabLayout.Tab, pos : Int->
                when(pos) {
                    0 -> tab.text = "页面一"
                    1 -> tab.text = "页面二"
                    2 -> tab.text = "页面三"
                }
        }.attach()
    }

    override fun initListener() {

    }
}